<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport" />
<title>
  <switch name="timestatus" >
    <case value="1">(直播中)</case>
    <case value="2">(直播已结束)</case>
    <case value="0">(直播未开始)</case>
    <default />
  </switch>
  {$liveinfo['live_name']}</title>
<link href="__CSS__style.css" type="text/css" rel="stylesheet">
<script src="__JS__jquery-1.9.1.min.js" type="text/javascript"></script>
<style type="text/css">
.online-video-box{position: fixed; top: 0px; z-index:55; border-bottom:solid 1px #e9e7ef}
.online-tab-con{position:fixed; top: 239px; width:100%; background-color: #fff; z-index:88;}
.online-text i.online{display: inline-block;font-size:16px;line-height:18px;}
.online-text b{font-size: 12px; margin-top: -1px;}
.collect-box{top: 13px;}
.collect-box i.online{font-size: 18px;}
.online-tab-list{margin-top: 275px;}
.weikaishi{position: absolute; z-index: 10; width: 100%; height: 100%; text-align: center; font-size: 30px; font-weight: bold; color: #fff; background-color: rgba(0,0,0,.6); line-height: 200px;}
</style>
</head>
<body>
<input type="hidden" name="liveID" value="{$liveinfo['id']}">
<input type="hidden" name="livepre" value="{$liveinfo['live_pre']}">
<div class="w3 w-tab">
  <div class="online-video-box">
      <!--<div class="pic-box"<if condition="($yespay eq 1) or ($moneystatus eq 0)"> onclick="location.href=''"</if>>-->
        <!--<img src="{$liveinfo.live_img}">-->
        <!--<span><img src="__IMG__fvideoplay.png"></span>-->
      <!--</div>-->




    <div class="pic-box">
    <if condition="$moneystatus eq 1 and $yespay neq 1">
          <div class="weikaishi">请支付</div><img src="{$liveinfo.live_img}">
    <elseif condition="$liveinfo['live_addres'] neq ''" />

          <switch name="timestatus" >
            <case value="1"><video src="{$liveinfo['live_addres']}" height="180" width="100%" controls="controls" autoplay poster="" webkit-playsinline=""></video></case>
            <case value="2"><video src="{$liveinfo['live_addres']}" height="180" width="100%" controls="controls" autoplay poster="" webkit-playsinline=""></video></case>
            <default /><div class="weikaishi">直播未开始</div><img src="{$liveinfo.live_img}">
          </switch>

    </if>
    </div>

    <!--<if condition="$liveinfo['live_addres'] neq ''">-->
      <!--<div class="pic-box" id="vlivedata">-->
      <!--<if condition="$yespay eq 1">-->
        <!--<video src="{$liveinfo['live_addres']}" height="180" width="100%" controls="controls" poster="" webkit-playsinline=""></video>-->
      <!--<else />-->
        <!--<img src="{$liveinfo.live_img}">-->
      <!--</if>-->
      <!--</div>-->
    <!--<else />-->
      <!--<div class="pic-box"<if condition="($yespay eq 1) or ($moneystatus eq 0)"> onclick="location.href=''"</if>>-->
      <!--<img src="{$liveinfo.live_img}">-->
      <!--<span><img src="__IMG__fvideoplay.png"></span>-->
      <!--</div>-->
    <!--</if>-->

      <div class="online-text">
        <h4>{$liveinfo['live_name']}</h4>
        <p><i class="online">&#xe620;</i><b>{$liveinfo['live_startdate']}</b></p>
        <div class="collect-box">{:W('Live/showcollect',array('liveid'=>$liveinfo['id']))}</div>
      </div>
  </div>

  <div class="online-tab">
    <div class="online-tab-con clearfix">
      <if condition="date('Y-m-d H:i:s') lt $liveinfo['live_startdate']">
        <a class="hot-content current">热门推送</a>
      <elseif condition="date('Y-m-d H:i:s') gt $liveinfo['live_enddate']"/>
        <a class="past-content">往期回顾</a>
      <else />
        <a>聊天室</a>
      </if>
      <a>直播详情</a>
      <a>商城</a>
    </div>
    <div class="online-tab-list" style="padding-bottom: 0px;">
      <!--还没开始-->
      <if condition="$timestatus eq 2">
        <!--提醒我弹框开始-->
        <div class="poplayer">
          <div class="float-information">
            <div class="float-box remind-float">
              <h5>提醒我</h5>
              <div class="remind-content">
                <form>
                  <input type="tel" name="telnum" placeholder="请输入手机号" class="phone-box" id="phone_box">
                  <label class="code-for clearfix" for="code_box">
                    <input type="tel" name="telverf" placeholder="请输入验证码" class="code-box" id="code_box" />
                    <a id="getverf">获取验证码</a>
                  </label>
                  <div class="remind-btn clearfix">
                    <a href="#" class="sure-btn">确定</a>
                    <a href="#" class="cancel-btn">取消</a>
                  </div>
                </form>
              </div>
            </div>
          </div>
        </div>
        <!--提醒我弹框结束-->

        <script type="text/javascript">
          $(function(){
            /*发送手机验证码*/
            $("#getverf").click(function(){
                var mobile = $("input[name='telnum']").val();
                if(!checktel(mobile)){
                    alert('请输入有效的手机号码');
                    return false;
                }
                /*没电话则新增电话并设置提醒，否则直接设置提醒*/
                var liveid = $("input[name='liveID']").val();
                var savetel_url = "/Live/Reg/telverify";
                var teldata = {"usertel":mobile,"liveid":liveid,random:Math.random()};
                $.ajax({
                  url:savetel_url,
                  data:teldata,
                  type:"POST",
                  dataType:"html",
                  success:function (data){
                     if(data==1){
                      //存在
                      alert("存在此号码，设置提醒成功！");
                      setElemtstatus();
                      return false;
                    }else if(data==2){
                      //不存在
                      settime();
                    }else if(data==3){
                      //存在号码，并设置了提醒功能
                      alert("已经设置过提醒！");
                      setElemtstatus();
                      return false;
                    }
                  }
                });
            })

            //点击确定开始校验验证码并设置提醒
            $("a.sure-btn").click(function(){
              var mobile = $("input[name='telnum']").val();
              if(!checktel(mobile)){
                alert('请输入有效的手机号码');
                return false;
              }
              var liveid = $("input[name='liveID']").val();
              var verfnum = $("input[name='telverf']").val();
              if(verfnum==''){
                alert('请输入验证码！');
                $("input[name='telverf']").val(null);
                $("input[name='telverf']").focus();
                return false;
              }
              var savetel_url = "/Live/Reg/checkverify";
              var teldata = {"usertel":mobile,"liveid":liveid,"verfnum":verfnum,random:Math.random()};
              $.ajax({
                url:savetel_url,
                data:teldata,
                type:"POST",
                dataType:"html",
                success:function (data){
                  if(data=='-1'){
                    alert("验证码错误，请重新获取！");
                    $("input[name='telverf']").val(null);
                    return false;
                  }else if(data==1){
                    alert("设置提醒成功！");
                    setElemtstatus();
                    return false;
                  }
                }
              });

            })

            //清除当前输入的内容并隐藏弹框
            function setElemtstatus(){
              $("input[name='telverf']").val(null);
              $("input[name='telnum']").val(null);
              $(".poplayer").hide();
              $(".remind-float").hide();
            }


            //先验证手机号码是否有效
            function checktel(mobile){
              var reg = /^0?1[3|4|5|8|7][0-9]\d{8}$/;
              if(!reg.test(mobile)) {
                $("input[name='telnum']").val(null);
                $("input[name='telnum']").focus();
                return false;
              }else{
                return true;
              }
            }

            //倒计时
            var countdown = 30;
            function settime() {
              if (countdown == 0) {
                $("#getverf").html("获取验证码");
                countdown = 30;
                return;
              } else {
                $("#getverf").html("重新发送("+countdown+")");
                countdown--;
              }
              setTimeout(function() {
                settime()
              },1000)
            }
          })
        </script>
      </if>


      <!--已结束或未开始-->
      <if condition="($timestatus eq 0) or ($timestatus eq 2)">
        <div id="for-past-content">
          <volist name="list" id="v">
            <if condition="$v['id'] neq $liveinfo['id']">
              <a href="{:U('liveitem',array('liveID'=>$v['id']))}" class="tab-item clearfix">
                <div class="pic-item" style="position:relative">
                  <img src="{$v['live_img']}">
                  <div class="float-text" style="width:100%;height:100%;background:rgba(0,0,0,.5);left:0;top:0;position:absolute">
                    <i style="font-style:normal;position:absolute;top:50%;left:50%;margin-left:-17px;margin-top:-6px;color:#fff">{:W('Live/livestatus',array('livestarttime'=>$v['live_startdate'],'liveendtime'=>$v['live_enddate']))}</i>
                  </div>
                </div>
                <div class="tab-text">
                  <h5>{$v['live_name']}</h5>
                  <p>
                    <i class="online" style="margin-right:3px;display: inline-block;font-size:16px;line-height:16px;">&#xe620;</i>
                    <b>{$v['live_startdate']}</b>
                    <span>
                      <if condition="($v.live_pre eq 0) or ($v.live_pre eq '')">
                        {$v.live_dirll}<i class="online" style="font-weight:normal">&#xe646;</i>
                        <else />
                        ￥{$v.live_pre}
                      </if>
                    </span>
                  </p>
                </div>
              </a>
            </if>
          </volist>
          <if condition="($timestatus eq 0) and ($yeset eq 1)">
              <a class="remind-box" style="cursor: pointer; background-color: #ccc;">已设置提醒</a>
          </if>
          <if condition="($timestatus eq 0) and ($yeset neq 1)">
              <a class="remind-box remind-boxs" style="cursor: pointer;">提醒我</a>
          </if>
        </div>
      </if>

      <div id="for-chat">
        <if condition="$liveinfo['live_way'] eq 1">
          <if condition="($timestatus eq 1) and ($moneystatus eq 1) and ($yespay eq 0)">
                    <div class="poplayer2">
                      <div class="float-information2">
                        <div class="float-box2 online-float">
                          <h5>我要看直播</h5>
                          <div class="online-content">
                            <form id="formorder" name="formorder" action="{:U('/Home/Pay/liveindex')}" method="post">
                              <input type="hidden" name="url" value="{$url}">
                              <input type="hidden" name="money" value="{$liveinfo['live_pre']}">
                              <input type="hidden" name="liveid" value="{$liveinfo['id']}">
                              <input type="hidden" name="bodystr" value="{$liveinfo['live_name']}">
                            </form>
                            <p>您好，观看本直播需要收取您人民币{$liveinfo['live_pre']}元,更多现场热点等待您的欣赏。</p>
                            <div class="remind-btn online-btn clearfix">
                              <a class="pay-btn" id="gopay">确定支付</a>
                              <!--<a onclick="javascript:history.go(-1);" class="cancel-btn2">取消</a>-->
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                <script type="text/javascript">
                  $(function(){
                      $("#gopay").click(function(){
                        var getmoney = $("input[name='money']").val();
                        if($.trim(getmoney)!=""){
                          $('form#formorder').submit();
                        }else{
                          alert("付款金额有误！");
                          return false;
                        }

                      })
                  })
                </script>
          </if>
        <else />
          <if condition="($timestatus eq 1) and ($moneystatus eq 1) and ($yespay eq 0)">
            <div class="poplayer2">
              <div class="float-information2">
                <div class="float-box2 online-float">
                  <h5>我要看直播</h5>
                  <div class="online-content">
                    <form id="formorders" name="formorders" action="{:U('undirll')}" method="post">
                      <input type="hidden" name="url" value="{$url}">
                      <input type="hidden" name="dirll" value="{$liveinfo['live_dirll']}">
                      <input type="hidden" name="liveid" value="{$liveinfo['id']}">
                      <input type="hidden" name="bodystr" value="{$liveinfo['live_name']}">
                    </form>
                    <p>您好，观看本直播需要花费{$liveinfo['live_dirll']}华人钻,更多现场热点等待您的欣赏。</p>
                    <div class="remind-btn online-btn clearfix">
                      <a class="pay-btn" id="godirll">确定支付</a>
                      <!--<a onclick="javascript:history.go(-1);" class="cancel-btn2">取消</a>-->
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <script type="text/javascript">
              $(function(){
                $("#godirll").click(function(){
                  var getdirll = $("input[name='dirll']").val();
                  if($.trim(getdirll)!=""){
                    var url = $("input[name='url']").val();
                    var liveid = $("input[name='liveid']").val();
                    var bodystr = $("input[name='bodystr']").val();

                    var tourl = "/Live/Index/undirll";
                    var todata = {
                      "dirll":getdirll,
                      "url":url,
                      "liveid":liveid,
                      "bodystr":bodystr,
                      random:Math.random()
                    };
                    $.ajax({url:tourl,data:todata,type:"POST",dataType:"html",
                      success:function (data){
                        if(data==0){
                          alert("华人钻数量不足，请充值！");
                          location.href='{:U('Index/swopdrill',array('liveid'=>$liveinfo['id']))}'
                        }else if(data==1){
                          location.href=url;
                        }else{
                          alert("支付失败，请重新进入页面");
                          location.href="/Live/Index/index";
                        }
                      }
                    });

                  }else{
                    alert("华人钻数目有误！");
                    return false;
                  }

                })
              })
            </script>
          </if>
        </if>

        <!--送花版块-->
        <div class="poplayer3">
            <div class="float-box2 present-float">
              <h5>我要看直播</h5>
              <div class="online-content">
                <p>您好，您的钻石不足送礼失败，请充值获钻后赠送礼物。</p>
                <div class="remind-btn online-btn clearfix">
                  <a href="{:U('Index/swopdrill',array('liveid'=>$liveinfo['id']))}" class="recharge-btn">前往充值</a>
                  <!--<a class="cancel-btn3">取消</a>-->
                </div>
              </div>
            </div>
        </div>
        <!--<span class="success-float">成功送出</span>-->

        <!--正在直播，显示聊天窗口-->
        <if condition="$timestatus eq 1">
            <div class="chat-car"></div>
            <if condition="($yespay eq 1) or ($moneystatus eq 0)">
            <!--显示输入框-->
            <div class="chat-foot">
              <div class="chat-box clearfix">
                <a class="present-car"><i class="online presentonline">&#xe60a;</i></a>
                <input type="text" name="done" class="online-in">
                <a class="user-car">发送</a>
              </div>
            </div>
            </if>
          <script type="text/javascript" src="__JS__touchslider.js"></script>
          <div id="pobg" style="display: none;">
              <div id="slider" class="swipe" style="background-color: #fff; z-index:120;">
                <ul>
                  <li class="clearfix">
                    <volist name="gift" id="v">
                      <if condition="$i lt 9">
                        <span num="{$v['num']}">
                            <img src="__IMG__{$i}.png">
                            <h3>{$v['name']}</h3>
                            <em>{$v['num']}<i class="online">&#xe647;</i></em>
                        </span>
                      </if>
                    </volist>
                  </li>
                  <li class="clearfix">
                    <volist name="gift" id="v1">
                      <if condition="$i gt 8">
                        <span num="{$v1['num']}">
                            <img src="__IMG__{$i}.png">
                            <h3>{$v1['name']}</h3>
                            <em>{$v1['num']}<i class="online">&#xe647;</i></em>
                        </span>
                      </if>
                    </volist>
                  </li>
                </ul>
                <div class="posit clearfix"><a class="hover"></a><a></a></div>
                <div class="count-choose clearfix">
                  <h4 onclick="location.href='{:U('Index/swopdrill',array('liveid'=>$liveinfo['id']))}'"><i>充</i>充值</h4>
                  <a id="givapre">赠送</a>
                  <ul class="count-type">
                    <li class="count-li"><b class="flowernum">1</b><i class="online">&#xe64a;</i>
                      <ul>
                        <li class="li1">1</li>
                        <li class="li1">10</li>
                        <li class="li1">50</li>
                        <li class="li1">100</li>
                        <li class="li1">200</li>
                      </ul>
                    </li>
                  </ul>
                </div>
              </div>
          </div>

          <script type="text/javascript">
            $(function(){
              function talkTpl(u_name,u_time,u_content,e){
                  if(e==1){
                    var str = "<p class=\"indexsn chat-people-in\">"+u_name+"：进入直播间</p>";
                  }else if(e==2){
                    var str = "<div class=\"indexsn chat-present\"><h5>"+u_name+"<b>"+u_time+"</b></h5><div class=\"present-pic clearfix\">"+u_content+"</div></div>";
                  }else{
                    var str = "<div class=\"indexsn chat-content\"><h5>"+u_name+"<b>"+u_time+"</b></h5><p>"+u_content+"</p></div>";
                  }
                  return str;
              }

              //发送文字
              $(".user-car").click(function(){
                var getTalkv = $("input.online-in").val();
                if(getTalkv!=''){
                  $(".chat-car .indexsn:gt(20)").remove();
                  var oadTalkv = $('.chat-car').html();
                  var allTalkContent = talkTpl("{$userinfo_name}","{:date('H:i')}",getTalkv,0) + oadTalkv;
                  $('.chat-car').html(allTalkContent);
                  $("input.online-in").val(null);
                  wirteFile(allTalkContent);
                }
              })

              function wirteFile(v){
                if(v!=null){
                  var chatTalk = v;
                }else{
                  var chatTalk = $('.chat-car').html();
                }
                //alert(chatTalk);
                var tourl = "/Live/Talk/writef";
                var todata = {"talk":chatTalk,random:Math.random()};
                $.ajax({url:tourl,data:todata,type:"POST",dataType:"html",
                  success:function (data){
                    //alert(data);
                  }
                });
              }

              $(".online-text b").click(function(){
                //var l = $(".chat-car").children(11).html();
                //var p = $(".chat-car").children("*:lt(11)").html();
                //alert(p);
                //$('.chat-car').html(allTalkContent);
              })
              function readFile(){
                var e = arguments[0] ? 1 : arguments[0];
                var tourl = "/Live/Talk/readf";
                var todata = {random:Math.random()};
                $.ajax({url:tourl,data:todata,type:"POST",dataType:"html",
                  success:function (data){
                    $('.chat-car').html(data);
                    <if condition="($yespay eq 1) or ($moneystatus eq 0)">
                    if(e==1){
                      var oadTalkv = $('.chat-car').html();
                      var allTalkContent = talkTpl("{$userinfo_name}",null,null,1) + oadTalkv;
                      $('.chat-car').html(allTalkContent);
                      wirteFile(allTalkContent);
                    }
                    </if>
                    var chatHeight = $('.chat-car').height();
                    $('.chat-car').scrollTop(chatHeight);
                  }
                });
              }
              window.onload = function(){
                readFile(1);
                setInterval(readFile,3000);
              }

              /*--------------------------------------------------------------------------*/
              $("#pobg").click(function(){
                $(this).hide();
              })
              $("#slider").click(function(event){
                event.stopPropagation();
              })
              /*赠送*/
              $("#givapre").click(function(){
                $("#slider span").each(function(index, element) {
                    var t = $(this);
					if(t.hasClass("hover")){
                        var tName = t.find('h3').html();      //获取选定的礼物名称
                        var tImg = t.find('img').attr('src'); //获取选定的礼物图片
                        var giveV = $("b.flowernum").html();  //获取最终送出的个数值
                        var getTalkv = "<i><img src='"+tImg+"'></i><span>x&nbsp;"+giveV+"</span>";
                        //减去华人钻数量
                        var jourl = "/Live/Index/drillconsume";
                        var bodystr = "直播：{$liveinfo['live_name']}(消费"+giveV+"个华人钻)";
                        var jtodata = {"givev":giveV,"bodystr":bodystr,random:Math.random()};
                        $.ajax({url:jourl,data:jtodata,type:"POST",dataType:"html",
                          success:function (data){
                              if(data==0){
                                  alert('华人钻数量不足，请充值！');
                                  $(".poplayer3").show();
                                  $(".present-float").show();
                              }else if(data==1){
                                  $(".chat-car .indexsn:gt(20)").remove();
                                  var oadTalkv = $('.chat-car').html();
                                  var allTalkContent = talkTpl("{$userinfo_name}",'送出',getTalkv,2) + oadTalkv;
                                  wirteFile(allTalkContent);
                              }else{
                                  var msg = data;
                              }

                          }
                        });
					}
                });
                $("#pobg").hide();
              })
              /*选定对象*/
              $(".swipe li").each(function(index, el) {
                var t = $(this);
                t.find('span:gt(3)').addClass('borertop');
                t.find('span').each(function(index, el) {
                  var span = $(this);
                  span.click(function(event) {
                    var flownum = $(this).attr('num')
                    //$("b.flowernum").html(flownum);
                    $(".count-type li ul").hide();
                    $(this).addClass('hover').siblings().removeClass('hover');
                    $(this).parent().siblings().find('span').removeClass('hover');
                  });
                });
              });

              /*礼物数量选择*/
              $(".count-type").click(function(event) {
                if ($(".count-type li ul").css("display")=="none") {
                  $(this).find('li ul').slideDown();
                }else{
                  $(this).find('li ul').slideUp();
                }

              });

              /*选择送礼物数量*/
              $(".count-type li ul li").each(function(index, el) {
                $(this).click(function(event) {
                  var fnum = $(this).html();
                  $("b.flowernum").html(fnum);
                });
              });

              /*点击送礼物事件*/
              $(".present-car").click(function(){
                  //首先判断是否有足够的华人钻石
                  var tourl = "/Live/Index/isdrill";
                  var todata = {random:Math.random()};
                  $.ajax({url:tourl,data:todata,type:"POST",dataType:"html",
                    success:function (data){
                       //alert(data);
                       //没有钻石或者钻石数量少于10个
                       if(data==0){ //|| data==2
                          $(".poplayer3").show();
                          $(".present-float").show();
                       }else{
                           $("#pobg").show();
                           /*手势滑动*/
                           var mslide='slider';
                           new TouchSlider({id:mslide,'auto':'-1',fx:'ease-out',direction:'left',speed:600,timeout:5000,'before':function(index){
                             $(".posit a:eq("+index+")").addClass("hover").siblings().removeClass("hover");
                             $(".count-type li ul").hide();
                           }});
                           $("b.flowernum").html(1);
                           $("#slider span").removeClass('hover');
                       }
                    }
                  });
              });

            })
          </script>

        </if>

      </div>
    </div>

    <div class="online-tab-list hide">
      <div class="online-item">
        <!--<div class="online-item-pic"><img src="{$liveinfo['live_img']}"></div>-->
        <div class="online-item-text">
          <!--<h5>{$liveinfo['live_name']}</h5>-->
          <p>{$liveinfo['live_content']}</p>
        </div>
      </div>
    </div>


    <div class="online-tab-list hide">
            <volist name="shoplist" id="shop" empty="暂无商品">
            <a href="http://hrshop.hrtv.cn/index.php?controller=site&action=products&id={$shop['id']}" class="shop-list clearfix">
              <div class="shop-pic"><img src="{$shop['img']}"></div>
              <div class="shop-text">
                <h6>{$shop['name']}</h6>
                <p class="forprice">售价：<i>{$shop['sell_price']}元</i></p>
                <p class="forfree">赠送：<i>{$shop['point']}华人钻</i></p>
                <span class="gopay">立即购买</span>
              </div>
            </a>
            </volist>
    </div>

  </div>

</div>
<script type="text/javascript">
  $(document).ready(function($) {
    var onlineheight = $(".online-video-box").height();
    $(".online-tab").css({"margin-top":onlineheight+"px"});

    $(".w-tab").eq(0).show();
    $(".footer a").click(function(event) {
      $(this).addClass('hover').siblings('.footer a').removeClass('hover');
      $(".w-tab").eq($(this).index()).show().siblings(".w-tab").hide();
    });

    $(".float-box").click(function(event){
      event.stopPropagation();
    });
    $(".poplayer").click(function(event){
      $(".float-box").hide();
      $(this).hide();
      event.stopPropagation();
    });
    $(".poplayer2").click(function(event){
      //$(".float-box2").hide();
      //$(this).hide();
      //history.go(-1);
      event.stopPropagation();
    });

    $(".float-box2").click(function(event){
      event.stopPropagation();
    });

    $(".remind-boxs").click(function(){
      $(".poplayer").show();
      $(".remind-float").show();
    });
    $(".success-float").fadeOut(3000);

    $(".cancel-btn").click(function(){
      $("input[name='telverf']").val(null);
      $("input[name='telnum']").val(null);
      $(".poplayer").hide();
      $(".remind-float").hide();
    });

//    $(".cancel-btn2").click(function(){
//      $(".poplayer2").hide();
//      $(".online-float").hide();
//    });

    $(".cancel-btn3").click(function(){
      $(".present-float").hide();
      $(".poplayer3").hide();
    });
    $(".poplayer3").click(function(){
      $(".present-float").hide();
      $(this).hide();
    });

    //online-tab-con切换选择
    $(".online-tab-con a:first").addClass("current").siblings().removeClass('current');
    $(".online-tab-con a").click(function(event) {
      $(this).addClass('current').siblings().removeClass('current');
      $(".online-tab-list").eq($(this).index()).show().siblings(".online-tab-list").hide();
    });

    <if condition="($yespay eq 1) or ($moneystatus eq 0)">
    //收藏和取消收藏
    $(".collect-box").click(function(event) {
      issc();
    });
    function issc(){
        if($(".collect-box b").html()=="收藏") {
          $(".collect-box i").html("&#xe614;").css("color",'#ff7200');
          $(".collect-box b").html("已收藏");
          iscollect(0);
        }else{
          $(".collect-box i").html("&#xe60d;").css("color", '#858585');
          $(".collect-box b").html("收藏");
          iscollect(1);
        };
    }
    /*
     收藏与取消收藏
     t 1收藏 0取消收藏
     */
    function iscollect(t){
      var liveid = $("input[name='liveID']").val();
      var tourl = "/Live/Index/iscollect";
      var todata = {
        "liveid":liveid,
        "t":t,
        random:Math.random()
      };
      $.ajax({
        url:tourl,
        data:todata,
        type:"POST",
        dataType:"html",
        success:function (data){
        }
      });
    }
    </if>

  });
</script>
</body>
</html>
